Skip to content

Conversation

@servak
Copy link
Owner

@servak servak commented Jul 17, 2025

Summary

  • Implement a complete theme system supporting multiple predefined themes and custom user themes
  • Add dynamic theme switching capabilities with real-time UI updates
  • Harmonize dark theme colors for better visual consistency and reduced eye strain
  • Support partial theme overrides and custom theme definitions

Features Added

Theme System Architecture

  • Multiple predefined themes: dark, light, monokai, nord, xoria256
  • Dynamic theme switching: Runtime theme changes via configuration
  • Partial override support: Override specific colors in predefined themes
  • Custom theme validation: Ensure all required colors are defined
  • Theme cycling: Navigate through available themes programmatically

Color Palette Improvements

  • Harmonized dark theme: Unified saturation and brightness levels
    • Success: #00ff00#5FFF87 (harmonious green)
    • Error: #ff0000#FF5F87 (harmonious red-pink)
    • Accent: #00ffff#5FAFFF (softer blue, 256-color compatible)
  • Terminal compatibility: 256-color codes for broader terminal support
  • Reduced eye strain: Replace harsh neon colors with softer alternatives

Configuration Support

  • YAML configuration: Theme settings in configuration files
  • Theme merging: Combine base themes with user overrides
  • Fallback handling: Graceful degradation when themes are missing

Technical Implementation

  • Theme management through Config struct with YAML unmarshaling
  • Validation system ensuring theme completeness
  • Thread-safe theme switching with proper state management
  • Comprehensive test coverage for all theme operations

Test Plan

  • All theme validation tests pass
  • Theme switching functionality verified
  • Color harmony manually validated
  • YAML configuration parsing works correctly
  • Fallback mechanisms function properly
  • Custom theme definition and override capabilities tested

servak added 5 commits July 17, 2025 06:24
- Add Theme struct with hex color support for all UI components
- Implement environment-based auto theme detection
- Replace hardcoded colors with theme-aware color system
- Add predefined themes (dark/light) with proper contrast
- Support custom user-defined themes in config file
- Fix Recent History timestamp color display issue
- Maintain backward compatibility with existing color settings
- Remove deprecated ColorScheme struct and legacy code

Resolves light mode visibility issues in Host List and Host Details panels.
- Add theme partial override functionality for predefined themes
- Implement custom theme validation requiring complete definitions
- Replace hardcoded GetThemeList with dynamic generation from PredefinedThemes
- Add xoria256, monokai, nord, gruvbox themes to predefined collection
- Introduce mergeThemes mechanism for YAML configuration loading
- Remove auto theme detection and simplify default to 'dark'
- Add comprehensive test coverage for theme validation and merging
- Remove hardcoded colors from TUI components
- Apply theme colors consistently across all panels (background, borders, text)
- Add 't' key binding for theme cycling in interactive mode
- Enable mouse support in TUI application
- Update help text to include theme cycling shortcut
- Improve color consistency in table headers and cells
- Fix FormatHostDetail function calls to include Theme parameter in tests
- Update NewHostListPanel test calls to include shared.Config parameter
- Update theme list expectations in tests to match current predefined themes
- Replace hardcoded color expectations with theme-based hex color codes
- Ensure all tests pass with new theme architecture
- Change dark theme accent from #00ffff to #00afd7 (256-color code 038)
- Update corresponding test expectations for new accent color
- Provides a more refined cyan tone for accent elements
@servak servak merged commit 9c3154d into main Jul 17, 2025
4 checks passed
@servak servak deleted the feat/add-theme-color branch July 17, 2025 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant